
<div class="content">
	<script>
		<?php
		if(-1!=$data['time']){
		?>
		var gourl = '<?=$data["gourl"]?>';
		ui.closeCallback = function(){
			if(ui.closeCallbackHandle){
				var imain = ui.closeCallbackHandle;
				alert(imain);
			}else if(!!window.frames["main-iframe"]){
				var imain = window.frames["main-iframe"];
			}else{
				var imain = window;
			}
			
			if(''==gourl){
				imain.location.reload();
			}else if('nothing'==gourl){
				
			}else{
				imain.location.href=gourl;
			}
		}
		<?php
		}
		?>
		
		<?php
		if(0<$data['time']){
		?>
		var timerHandle = null;
		function stopTimer(){
			clearInterval(timerHandle);
			ui.golast();
		}
		var timerNum = <?=$data['time']?>;
		$(document).ready(function(){
			timerHandle = setInterval(function(){
				timerNum--;
				$("#timer").text(timerNum);
				if(0==timerNum){
					
					stopTimer();
				}
			},1000);
		});		
		<?php
		}
		?>
	</script>
	<div class="alert">
		<div class="n-alert"><?=$data['msg']?></div> 
		<?php
		if(0<$data['time']){
		?>
		<div style="text-align: right;padding:10px;">
			<span id="timer" style="font-size: 20px;font-weight: 600;color:red;"><?=$data['time']?></span>秒后返回列表，手动点击[<a class="n-href" href="javascript:void(0)" onclick="timerNum=1"><span>返回</span></a>]
		</div>
		<?php
		}
		?>
		
	</div>
</div>
